    import request from '@/utils/request.js'

    export const authApi={
        list(authQuery){
            return request.get('/auth/list',{params:authQuery})
        },
		deleteById(id) {
			return request.delete( `/auth/deleteById/${id}`)   //反引号，直接写参数。否则需要字符串拼接
		},
		deleteAll(ids) {
			return request.delete( `/auth/deleteAll/${ids}`)
		},
		add(auth) {
			//auth以JSON形式传递到后台
			return request.post('/auth/add', auth)
		},
		selectById(id) {
			return request.get(`/auth/selectById/${id}`)
		},
		update(auth) {
			return request.put('/auth/update', auth)
		},
		updateStatus(id,status){
			return request.put(`/auth/updateStatus/${id}/${status}`)
		},
		selectByRole() {
			return request.get('/auth/selectByRole')
		},
		selectByRole2() {
			return request.get('/auth/selectByRole2')
		},
		selectAllParent() {
			return request.get('/auth/selectAllParent')
		}
	}
    

